package com.qlc.spring.cloud.demo.user.service;

import com.qlc.spring.cloud.demo.user.VO.UserVO;
import org.springframework.stereotype.Service;

/**
 * Name:  UserServiceImpl
 * User:  wang chang
 * CreateTime: 2019-05-28 16:22
 **/

@Service
public class UserServiceImpl implements UserService {
    @Override
    public UserVO getUserByCode(String userCode) {
        if ("0002".equals(userCode)) {
            UserVO userVO = new UserVO();
            userVO.setUserCode("0002");
            userVO.setAge(40);
            userVO.setMobile("13975893734");
            return userVO;
        }
        return null;
    }

    @Override
    public boolean addUser(UserVO userVO) {
        if (userVO == null) {
            return false;
        }
        return true;
    }
}
